@model Free2AskWeb.Models.QuestionsModel

@{
    ViewBag.Title = "Index";
}

@section Styles {
    <link href="@Url.Content("~/Content/Index.css")" rel="stylesheet" type="text/css" />
    <link href="@Url.Content("~/Content/tag.css")" rel="stylesheet" type="text/css" />
}

@section subnav{"Questions"}


@foreach(var q in Model.All)
{
     <dl>
        <dt id="status-container">
            <div id="voteArrow"></div>
            <div id="voteDiv">
	            <div id="voteCount">@q.Votes.Sum(v=>v.Value).ToString()</div>
  	            <div id="voteText">Vote</div>
  	            <div id="answerCount">@q.Answers.Count.ToString()</div>
  	            <div id="answerText">Answer</div>
            </div>
   	        <div id="viewCount">0 Views</div>
        </dt>
        <dd id="summary">
	        <div><h3>@Html.ActionLink(q.Title,"Details","Question",new {questionID=q.ID},null) </h3>
	        </div>
   	        <div class="quesTxt">@HttpUtility.HtmlDecode(q.PostContent).StripHtmlTags().Truncate(170)</div>
        </dd>
        <dd class="AuthorInfo"><h3>Author: @q.Author.UserName</h3></dd>
   </dl>
}

<div class="pageNum">@Html.PageLinks(Model.PageInfo,u=>Url.Action("Index","Home",new {Page=u}))</div>

@section rightColumn{
            @Html.Partial("_TagListView",Model.Tags)
}

